<template>

  <div class="code_area">
    <pre><code :class="lang"><slot></slot></code></pre>
  </div>

</template>

<script>
  import '../../assets/highlight/solarized-light.css'
  import '../../assets/highlight/highlight.pack.js'
  export default {
    data() {
      return {}
    },
    mounted() {
      console.log(6666);
      hljs.initHighlightingOnLoad();
    },
    props: {
      lang: {
        type: String,
        default: 'javascript'
      },
    },
    created() {

    }
  }
</script>
<style scoped>
  .code_area {
    margin: 0 .25rem;
    padding: 0;
    background: #fff;
    position: relative;
    font-family: monospace;
  }

  pre {
    margin: 0;
    padding: 0;
    width: 100%;
  }
</style>
